

/*
 * @(#)MaintWorkflowStepFormEquatForm.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.workflow.web;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;

import com.dcivision.framework.ApplicationException;
import com.dcivision.framework.TextUtility;
import com.dcivision.framework.bean.AbstractBaseObject;
import com.dcivision.framework.web.AbstractActionForm;
import com.dcivision.workflow.bean.WorkflowStepFormEquat;

/**
  MaintWorkflowStepFormEquatForm.java

  This class is the for web form purpose.

  @author      Tony Chen
  @company     DCIVision Limited
  @creation date   03/09/2004
  @version     $Revision: 1.6 $
*/

public class MaintWorkflowStepFormEquatForm extends AbstractActionForm {

  public static final String REVISION = "$Revision: 1.6 $";
   

  private String workflowStepID = null;
  private String formRecordID = null;
  private String operand = null;
  private String operand1 = null;
  private String operand2 = null;
  private String operator = null;
  private String compare = null;
  private String value = null;
  private String formEquation = null;
  private String formElement = null;
  private String operationType = null;
  private String dateFormat = null;
  private String routeName = null;
  private String defaultFlag = null;
  private String formEquationListValue = null;
  private String workflowRecordID = null;
  private String formEquationItem = null;
  private String routeNameListValue = null;
  private String optionElementIDs = null;
  
  public MaintWorkflowStepFormEquatForm() {
    super();
  } 
  
  public void reset(ActionMapping mapping, HttpServletRequest request) {
    this.setWorkflowStepID(null);
    this.setFormRecordID(null);
    this.setOperand(null);
    this.setOperand1(null);
    this.setOperand2(null);
    this.setOperator(null);
    this.setCompare(null);
    this.setValue(null);
    this.setFormEquation(null);
    this.setOperationType(null);
    this.setDateFormat(null);
    super.reset(mapping, request);    
  }
  
  public AbstractBaseObject getFormData() throws ApplicationException {
    WorkflowStepFormEquat tmpFormEquat = new WorkflowStepFormEquat();
    tmpFormEquat.setID(TextUtility.parseIntegerObj(this.getID()));
    tmpFormEquat.setWorkflowStepID(TextUtility.parseIntegerObj(this.getWorkflowStepID()));
    tmpFormEquat.setFormRecordID(TextUtility.parseIntegerObj(this.getFormRecordID()));
    tmpFormEquat.setOperand1(this.getOperand1());
    tmpFormEquat.setOperand2(this.getOperand2());
    tmpFormEquat.setCompare(this.getCompare());
    tmpFormEquat.setFormEquation(this.getFormEquation());
    tmpFormEquat.setOperationType(this.getOperationType());
    tmpFormEquat.setDateFormat(this.getDateFormat());
    tmpFormEquat.setRecordStatus(this.getRecordStatus());
    tmpFormEquat.setUpdateCount(TextUtility.parseIntegerObj(this.getUpdateCount()));
    tmpFormEquat.setCreatorID(TextUtility.parseIntegerObj(this.getCreatorID()));
    tmpFormEquat.setCreateDate(parseTimestamp(this.getCreateDate()));
    tmpFormEquat.setUpdaterID(TextUtility.parseIntegerObj(this.getUpdaterID()));
    tmpFormEquat.setUpdateDate(parseTimestamp(this.getUpdateDate()));
    return tmpFormEquat;
  }
  
  public void setFormData(AbstractBaseObject baseObj) throws ApplicationException {
    WorkflowStepFormEquat tmpFormEquat = (WorkflowStepFormEquat)baseObj;
    this.setID(tmpFormEquat.getID().toString());
    this.setWorkflowStepID(tmpFormEquat.getWorkflowStepID().toString());
    this.setFormRecordID(tmpFormEquat.getFormRecordID().toString());
    this.setOperand1(tmpFormEquat.getOperand1());
    this.setOperand2(tmpFormEquat.getOperand2());
    this.setCompare(tmpFormEquat.getCompare());
    this.setFormEquation(tmpFormEquat.getFormEquation());
    this.setOperationType(tmpFormEquat.getOperationType());
    this.setDateFormat(tmpFormEquat.getDateFormat());
    this.setRecordStatus(tmpFormEquat.getRecordStatus());
    this.setUpdateCount(TextUtility.formatIntegerObj(tmpFormEquat.getUpdateCount()));
    this.setCreatorID(TextUtility.formatIntegerObj(tmpFormEquat.getCreatorID()));
    this.setCreateDate(formatTimestamp(tmpFormEquat.getCreateDate()));
    this.setUpdaterID(TextUtility.formatIntegerObj(tmpFormEquat.getUpdaterID()));
    this.setUpdateDate(formatTimestamp(tmpFormEquat.getUpdateDate()));
  }
  
  public String getWorkflowStepID(){
    return this.workflowStepID;
  }
  
  public void setWorkflowStepID(String workflowStepID){
    this.workflowStepID = workflowStepID;
  }
  
  public String getFormRecordID(){
    return this.formRecordID;
  }
  
  public void setFormRecordID(String formRecordID){
    this.formRecordID = formRecordID;
  }
  
  public String getOperand(){
    return this.operand;
  }
  
  public void setOperand(String operand){
    this.operand = operand;
  }
  
  public String getOperand1(){
    return this.operand1;
  }
  
  public void setOperand1(String operand1){
    this.operand1 = operand1;
  }
  
  public String getOperand2(){
    return this.operand2;
  }
  
  public void setOperand2(String operand2){
    this.operand2 = operand2;
  }
  
  public String getOperator(){
    return this.operator;
  }
  
  public void setOperator(String operator){
    this.operator = operator;
  }
  
  public String getCompare(){
    return this.compare;
  }
  
  public void setCompare(String compare){
    this.compare = compare;
  }
  
  public String getValue(){
    return this.value;
  }
  
  public void setValue(String value){
    this.value = value;
  }
  
  public String getFormEquation(){
    return this.formEquation;
  }
  
  public void setFormEquation(String formEquation){
    this.formEquation = formEquation;
  }
  
  public String getFormElement(){
  	return this.formElement;
  }
  
  public void setFormElement(String formElement){
  	this.formElement = formElement;
  }
  
  public String getOperationType(){
    return this.operationType;
  }
  
  public void setOperationType(String operationType){
    this.operationType = operationType; 
  }
  
  public String getDateFormat(){
    return this.dateFormat; 
  }
  
  public void setDateFormat(String dateFormat){
    this.dateFormat = dateFormat; 
  }
  
  public String getRouteName(){
    return this.routeName; 
  }
  
  public void setRouteName(String routeName){
    this.routeName = routeName; 
  }
  
  public String getDefaultFlag(){
    return this.defaultFlag; 
  }
  
  public void setDefaultFlag(String defaultFlag){
    this.defaultFlag = defaultFlag; 
  }
  
  public String getFormEquationListValue(){
    return this.formEquationListValue;
  }
  
  public void setFormEquationListValue(String formEquationListValue){
    this.formEquationListValue = formEquationListValue; 
  }
  
  public String getWorkflowRecordID(){
    return this.workflowRecordID;  
  }
  
  public void setWorkflowRecordID(String workflowRecordID){
    this.workflowRecordID = workflowRecordID; 
  }
  
  public String getFormEquationItem(){
    return this.formEquationItem;    
  }
  
  public void setFormEquationItem(String formEquationItem){
    this.formEquationItem = formEquationItem; 
  }
  
  public String getRouteNameListValue(){
    return this.routeNameListValue; 
  }
  
  public void setRouteNameListValue(String routeNameListValue){
    this.routeNameListValue = routeNameListValue; 
  }
  
  public String getOptionElementIDs() {
    return optionElementIDs;
  }
    
  public void setOptionElementIDs(String optionElementIDs) {
    this.optionElementIDs = optionElementIDs;
  }
}



